package com.liu.community.mapper;/*
 *@Author:Liu Xing-zhi
 *Description:
 *Date:Crated in 15:20 2021/10/12
 */

import com.liu.community.pojor.Comment;
import com.liu.community.pojor.Question;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CommentMapper {

    void insert(Comment comment);

    List<Comment> queryCommentByParentId(@Param("parentId") Integer parentId);

    List<Comment> queryAllCommentByParentIdAndType(@Param("parentId") Integer parentId,@Param("type") Integer type);

    Comment queryCommentById(@Param("id") Integer id);

    void updateCommentCount(@Param("id") Integer id,@Param("commentCount") Integer commentCount);

    Comment queryCommenter(@Param("gmtCreate") Long gmtCreate);
}
